<?php
require_once dirname(__FILE__) . '/../common/Common.php';
require_once dirname(__FILE__) . '/../dao/dao_live/dao_live.class.php';
require_once dirname(__FILE__) . '/../conf/OutDefine.php';
class GetIndustryList extends AbstractInterface//获取行业列表
{
    public function initialize()
    {
        return true;
    }

    public function verifyInput(&$args)//获取参数
    {
        $req = $args['interface']['para'];

        $rules = array(
		//'参数名'=>array('type'=>'参数字段类型');
            //'userid' => array('type' => 'string'),
        	//'groupid'=>array('type' => 'string'),
        	//'title' => array('type' => 'string'),
        );
        return $this->_verifyInput($args, $rules);
    }

    public function process()
    {
        interface_log(INFO, EC_OK,"GetIndustryList args=" . var_export($this->_args, true));
        $config = getConf('ROUTE.DB');

        $dao_live = new dao_live($config['HOST'], $config['PORT'], $config['USER'], $config['PASSWD'], $config['DBNAME']);
        $error_message = "";
    	$ret = $dao_live->getIndustryList($result);
    	if($ret != 0)
    	{
    		$this->_retValue =$ret;
    		$error_message="db error:no permission";
    		$this->_retMsg = 'GetIndustryList::process() fail '.genErrMsg($this->_retValue);
    		return false;
    	}

        $this->_retValue = EC_OK;//返回数据的状态码
        $this->_data=$result;//返回数据的数据数组
        interface_log(INFO, EC_OK, 'GetIndustryList::process() succeed');
        return true;
    }
}

?>
